package com.youhome.service.service;

import com.github.pagehelper.PageInfo;
import com.youhome.common.exception.CustomException;
import com.youhome.service.model.*;
import com.youhome.service.parameter.ParamOwnHouse;
import com.youhome.service.response.*;

import java.util.Date;
import java.util.List;

/**
 * Created by chen365 on 2018/05/09.
 */
public interface ListHubService {
    int updateByPrimaryKeySelective(ListHub record);

    ListHub selectByPrimaryKey(String houseId);

    PageInfo<ListHubList> selectByBean(Integer pageIndex, Integer pageSize, ListHubParam param);

    List<HouseMap> selectMapByBean(ListHubParam param);

    List<ListHubList> selectRecommendHouseByCompanyId(Long companyId);

    List<ListHubList> selectShareGroupHouseByShareId(String shareId) throws CustomException;

    List<HouseCircum> selectHouseCircumByBean(Integer pageIndex, Integer pageSize, ListHubParam param);

    List<AssociateAddress> selectAssociateByAddress(String address);

    String selectZipByPrimaryKey(String houseId);

    int save(String houseId, String listingKey, Long companyId, String unitNumber, String fullStreetAddress, String city, String state, String county, String zip,
             Double listPrice, String listingCategory, String listingStatus, Date listingDate, String listingTitle,
             String listingDescription,

             Integer bedroomCount, Integer bathroomCount, Integer fullBathroomCount, Integer threeQuarterBathroomCount,
             Integer halfBathroomCount, Integer oneQuarterBathroomCount,

             String propertyType, String propertySubtype,

             String mlsId, String mlsName, String mlsNumber, Double livingArea, Double lotSize, Integer yearBuilt,
             String builderName, Double latitude, Double longitude, String parcelId, Boolean isStar, String photos,
             Boolean isNewHouse,
             String communityName,
             String housesName,
             Double forecastRent,
             Double forecastPropertyFee,
             Double forecastHousePropertyTax, String floorPlans);

    int delete(String houseId, Long companyId);

    int updateStar(ListHub record);

    ListHubBase selectBaseByPrimaryKey(String houseId) throws CustomException;

    int selectCountByZips(ListHubParam param);

    PageInfo<ListHubList> selectFavouriteHouseByUserId(Integer pageNumber, Integer pageSize, Long userId);

    List<ListHub> selectTest();

    PageInfo<ListHubList> selectRandByBean(Integer pageNumber, Integer pageSize, ListHubParam params);

    HoaFeeSchoolGradeResult selectHoaFeeSchoolGrade(String houseId) throws CustomException;

    PageInfo<ListHubList> selectFavouriteHouseByUserId(Principal principal,Integer pageNumber, Integer pageSize) throws CustomException;

    void setStar(String houseId) throws CustomException;

    void delete(String houseId) throws CustomException;

    void save(ParamOwnHouse map) throws CustomException;

    List<ListHubList> selectRecommendHouse() throws CustomException;

    TranslationResult selectListingDescription(String houseId) throws CustomException;

    PriceForecastResult selectHomeValueForecast(String houseId) throws CustomException;

    List<HouseCircum> selectSimilarHousesNearby(String houseId) throws CustomException;

    Characteristics selectCharacteristics(String houseId) throws CustomException;

    HouseBasicInfo selectBasicInfo(String houseId) throws CustomException;

    ListHub selectDetailsByHouseId(String houseId) throws CustomException;

    HouseDetailsResult selectDetailsByHouseIdOfApi(String houseId) throws CustomException;

    ProviderResult selectProviderByHouseId(String houseId) throws CustomException;

    DTOStatsResult selectStatsOfApi(String houseId) throws CustomException;

    boolean selectExistByHouseId(String houseId)throws CustomException;
}
